//219970848周琦
let gg1 = document.getElementById("gg1");
let defaultTop = parseInt(window.getComputedStyle(gg1).getPropertyValue('top'));
let gg2 = document.getElementById("gg2");
let defaultTop2 = parseInt(window.getComputedStyle(gg2).getPropertyValue('top'));
window.addEventListener('scroll', function () 
{
    let scrollDistance = window.pageYOffset;
    let newTop = defaultTop + scrollDistance;
    gg1.style.top = newTop + 'px';
    let newTop2 = defaultTop2 + scrollDistance;
    gg2.style.top = newTop2 + 'px';
});
let gg3 = document.getElementById("gg3");
function showAd() 
{
    gg3.classList.add("show");
}
setTimeout(showAd,1500);
function gtie1()
{
    gg1.style.left = "-100%"; 
    setTimeout(function () 
	{
        gg1.style.display = "none"; 
    });
}
function gtie2() 
{
    gg2.style.right = "-100%"; 
    setTimeout(function () 
	{
        gg2.style.display = "none"; 
    });
}
function gtie3() 
{
    gg3.classList.add("move");
    gg3.style.bottom = "-100%"; 
    setTimeout(function () 
	{
        gg3.style.display = "none"; 
    },2000); 
}